package com.shop.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.shop.dao.UserDao;
import com.shop.entity.User;
import com.shop.service.UserService;
@Service
@Transactional
public class UserServiceImpl implements UserService{
	
	@Autowired
	private UserDao userDao ;
	@Override
	public Serializable saveUser(User user) {
		return userDao.saveUser(user);
	}

	@Override
	public Serializable deleteUser(User user) {
		return userDao.deleteUser(user);
		
	}

	@Override
	public Serializable updateUser(User user) {
		return userDao.updateUser(user);
	}

	@Override
	public List<User> findUser(User user) {
		return userDao.findUser(user);
	}

	public UserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	@Override
	public User login(User user) {
		return userDao.login(user);
	}
	
	

}
